﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class admin_Modules_temp_List : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //this.btnDelete.Attributes.Add("onclick", "a=confirm('Đồng ý xóa?');document.getElementById('" + hidDelete.ClientID + "').value=a;");
        this.btnDuyet.Attributes.Add("onclick", "a=confirm('Đồng ý duyệt?');document.getElementById('" + this.Duyet.ClientID + "').value=a");
        if (!this.IsPostBack) {
            LoadDataGrid();
        }
    }

    protected void grdDs_SelectedIndexChanged(object sender, EventArgs e)
    {

    }


    private void LoadDataGrid() {
        using (DamiWebDataContext db = new DamiWebDataContext())
        {
            var query = from p in db.tbl_Nick_Yahoo_Langs
                        where p.tbl_Nick_Yahoo.idNick == p.idNick
                        && p.idLang == 1
                        select new
                        {
                            p.idNick,
                            p.idNickLang,
                            p.Description,
                            p.tbl_Nick_Yahoo.Nickname
                        };
            this.grdDs.DataSource = query;
            this.grdDs.DataBind();
        }
    }

    protected void btnDuyet_Click(object sender, ImageClickEventArgs e)
    {

    }

    protected void btnimgDel_Click(object sender, ImageClickEventArgs e)
    {

    }
}